package com.njlime.sys.entities;

import com.njlime.core.base.entities.BaseEntityPlus;
import com.njlime.core.web.validation.RegexType;
import com.njlime.core.web.validation.annotation.Validate;

import javax.persistence.Entity;
import javax.persistence.Table;

/**
 * 单位实体
 * Created by Dean on 2017-7-18.
 */
@Entity
@Table(name = "t_unit")
public class Unit extends BaseEntityPlus {
    @Validate(description = "父级单位", nullable = false, regexType = RegexType.NUMBER)
    private Integer parent_id; //父ID
    private String parent_ids; //父ID串
    @Validate(description = "单位名称", nullable = false)
    private String unit_name; //单位名称
    private String unit_type; //单位类型
    @Validate(description = "单位头像", nullable = false)
    private String head_url; //单位头像地址
    @Validate(description = "单位简介", nullable = false)
    private String introduction; //单位介绍
    @Validate(description = "省份代码", nullable = false)
    private Integer province_id; //省份代码
    @Validate(description = "省份名称", nullable = false)
    private String province_name; //省份名称
    @Validate(description = "城市代码", nullable = false)
    private Integer city_id; //城市代码
    @Validate(description = "城市名称", nullable = false)
    private String city_name; //城市名称
    private Integer area_id; //区域代码
    private String area_name; //区域名称
    private Integer status; //状态 1可用 0禁用
    private Integer login_flag; //登录限制

    //注册
    private Integer media_type; //媒体类型
    private String org_name; //组织名
    private String org_code;//组织代码
    private Integer org_class;//党政组织级别
    private String address;//组织地址
    private String confirm_pic;//确认书
    private String wap_address;//网站
    private String up_person;//推荐人
    private Integer manager_id; //运营者
    private String content; //已有内容及链接


    /**
     * 单位类型
     */
    public static final class UnitType {
        public static final int PERSON = 1; //个人
        public static final int MEDIA = 2; //媒体
        public static final int GOVERNMENT = 3; //党政机关
        public static final int BUSINESS = 4; //企业组织
    }

    /**
     * 媒体类型
     */
    public static final class UnitMediaType {
        public static final int NEWS = 1; //新闻机构
        public static final int ARTICLE = 2; //创作团体
    }

    /**
     * 党政机关级别
     */
    public static final class UnitOrgClass {
        public static final int NATION = 1; //国家级
        public static final int PROVINCE = 2; //省部级
        public static final int CITY = 3; //厅局级
        public static final int COUNTY = 4; //县处级
        public static final int UNDER_COUNTY = 5; //县处级以下
    }


    public Integer getParent_id() {
        return parent_id;
    }

    public void setParent_id(Integer parent_id) {
        this.parent_id = parent_id;
    }

    public String getParent_ids() {
        return parent_ids;
    }

    public void setParent_ids(String parent_ids) {
        this.parent_ids = parent_ids;
    }

    public String getUnit_name() {
        return unit_name;
    }

    public void setUnit_name(String unit_name) {
        this.unit_name = unit_name;
    }

    public String getUnit_type() {
        return unit_type;
    }

    public void setUnit_type(String unit_type) {
        this.unit_type = unit_type;
    }

    public String getHead_url() {
        return head_url;
    }

    public void setHead_url(String head_url) {
        this.head_url = head_url;
    }

    public String getIntroduction() {
        return introduction;
    }

    public void setIntroduction(String introduction) {
        this.introduction = introduction;
    }

    public Integer getStatus() {
        return status;
    }

    public void setStatus(Integer status) {
        this.status = status;
    }

    public Integer getProvince_id() {
        return province_id;
    }

    public void setProvince_id(Integer province_id) {
        this.province_id = province_id;
    }

    public String getProvince_name() {
        return province_name;
    }

    public void setProvince_name(String province_name) {
        this.province_name = province_name;
    }

    public Integer getCity_id() {
        return city_id;
    }

    public void setCity_id(Integer city_id) {
        this.city_id = city_id;
    }

    public String getCity_name() {
        return city_name;
    }

    public void setCity_name(String city_name) {
        this.city_name = city_name;
    }

    public Integer getArea_id() {
        return area_id;
    }

    public void setArea_id(Integer area_id) {
        this.area_id = area_id;
    }

    public String getArea_name() {
        return area_name;
    }

    public void setArea_name(String area_name) {
        this.area_name = area_name;
    }

    public Integer getMedia_type() {
        return media_type;
    }

    public void setMedia_type(Integer media_type) {
        this.media_type = media_type;
    }

    public String getOrg_name() {
        return org_name;
    }

    public void setOrg_name(String org_name) {
        this.org_name = org_name;
    }

    public String getOrg_code() {
        return org_code;
    }

    public void setOrg_code(String org_code) {
        this.org_code = org_code;
    }

    public Integer getOrg_class() {
        return org_class;
    }

    public void setOrg_class(Integer org_class) {
        this.org_class = org_class;
    }

    public String getAddress() {
        return address;
    }

    public void setAddress(String address) {
        this.address = address;
    }

    public String getConfirm_pic() {
        return confirm_pic;
    }

    public void setConfirm_pic(String confirm_pic) {
        this.confirm_pic = confirm_pic;
    }

    public String getWap_address() {
        return wap_address;
    }

    public void setWap_address(String wap_address) {
        this.wap_address = wap_address;
    }

    public String getUp_person() {
        return up_person;
    }

    public void setUp_person(String up_person) {
        this.up_person = up_person;
    }

    public Integer getLogin_flag() {
        return login_flag;
    }

    public void setLogin_flag(Integer login_flag) {
        this.login_flag = login_flag;
    }

    public Integer getManager_id() {
        return manager_id;
    }

    public void setManager_id(Integer manager_id) {
        this.manager_id = manager_id;
    }

    public String getContent() {
        return content;
    }

    public void setContent(String content) {
        this.content = content;
    }
}
